How does length of maternity leave taken by women in New York City vary according to key socioeconomic characteristics?
How does length of maternity leave differ by zip code? Do these spacial patterns match the distribution of key socioeconomic characteristics?
Is the geographic distribution of average length of maternity leave associated with X, Y, X?
Our primary data source is the NYC Work and Family Leave Survey (WFLS).
The NYC WFLS is a telephone survey conducted in March 2016, which was administered to 1,000 New York City residents who gave birth in 2014. The goal was to understand the availability and accessibility of paid family leave to working parents. The WLFS also sought to describe the role that paid family leave policies play in achieving health equity for parents and children.
NYC zipcodes by neighborhood and borough came from the New York State Department of Health Zipcode Definitions Page.
Outcomes
leave_weeks = weeks of maternity leave (paid or unpaid)paid_leave_weeks = weeks of paid maternity leaveunpaid_leave_weeks = weeks of unpaid maternity leavepostpartum_check = had a postpartum checkup 4-6 weeks after giving birthPredictors
neighborhood = neighborhood (based on five digit zip code)race = race of survey respondentincome = family income as percent of the federal poverty levelfood_insecurity = concern about having enough food to feed family or receives public assistance in the form of SNAP benefits / food stampseducation = highest grade or year of school completedpartner = co-parenting status (single or co-parent)job_type = type of employment during pregnancy (government, private company, non-profit, self-employed)Read in data, create new variables, and select key variables for analysis
wfls_df =
read_csv("./data/WFLS_2014.csv") %>%
mutate(
recode_el12mns = el12mns*4,
el11 = as.character(el11),
leave_type = case_when(
el11 == '1' ~ "Paid",
el11 == '2' ~ "Unpaid",
el11 == '3' ~ "Both",
el11 == '4' ~ "Did not take time off"),
leave_weeks = coalesce(recode_el12mns, el12wks),
leave_weeks = na_if(leave_weeks, 77),
leave_weeks = na_if(leave_weeks, 99),
ulw_recode = case_when(
leave_type == "Unpaid" ~ leave_weeks),
unpaid_leave_weeks = coalesce(ulw_recode, el13d),
pct_unpaid = round((unpaid_leave_weeks/leave_weeks)*100),4,
partner = case_when(
cp1 == '1' ~ "Co-parent",
cp1 == '2' ~ "Single Parent"),
education = case_when(
d7 == '1' ~ "No high school degree",
d7 == '2' ~ "No high school degree",
d7 == '3' ~ "No high school degree",
d7 == '4' ~ "High school degree/GED",
d7 == '5' ~ "Some college or technical school",
d7 == '6' ~ "Four year college or higher"),
d4_2 = na_if(d4_2, 77),
d4_2 = na_if(d4_2, 99),
race = case_when(
d4_1 == '1' ~ "White",
d4_1 == '2' ~ "Black/African American",
d4_1 == '3' ~ "Asian",
d4_1 == '4' ~ "Native Hawaiian/OPI",
d4_1 == '5' ~ "American Indian/AN",
d4_1 == '8' ~ "Other",
d3 == 1 ~ "Hispanic",
d4_2 >= 1 ~ "Multiple"),
job_type = case_when(
el3 == '1' ~ "Government",
el3 == '2' ~ "Private",
el3 == '3' ~ "Non-profit",
el3 == '4' ~ "Self-employed"),
unemploy_reason = el16,
unemploy_reason = case_when(
el16 == '1' ~ "Fired related to pregnancy or maternity leave",
el16 == '2' ~ "Chose to stay-at-home",
el16 == '3' ~ "Not enough flexibility",
el16 == '4' ~ "No affordable childcare",
el16 == '5' ~ "My health issues",
el16 == '6' ~ "Baby's health issues",
el16 == '7' ~ "Currently a student",
el16 == '8' ~ "Can't find work",
el16 == '9' ~ "Looking for other jobs",
el16 == '10' ~ "other") ,
bf1_1 = case_when(
bf1_1 == '1' ~ "Never",
bf1_1 == '2' ~ "Less than 1 Week",
bf1_1 == '3' ~ "Weeks",
bf1_1 == '4' ~ "Months",
bf1_1 == '5' ~ "Still breastfeeding",
bf1_1 == '77' ~ "don't know",
bf1_1 == '99' ~ "refused"),
food_insecurity = case_when(
es2 == 1 ~ 1,
es1a == 1 ~ 1,
es1a == 2 ~ 1,
es1a == 3 ~ 1,
es2 == 0 ~ 0,
es1a == 4 ~ 0
),
family_income = case_when(
es3 == '1' ~ "Less than $16,000",
es3 == '2' ~ "$16,001 to $20,000",
es3 == '3' ~ "$20,001 to 40,000",
es3 == '4' ~ "$20,001 to 40,000",
es3 == '5' ~ "$20,001 to 40,000",
es3 == '6' ~ "$20,001 to 40,000",
es3 == '7' ~ "$40,001 to 60,000",
es3 == '8' ~ "$40,001 to 60,000",
es3 == '9' ~ "$40,001 to 60,000",
es3 == '10' ~ "$60,001 to 85,000",
es3 == '11' ~ "$60,001 to 85,000",
es3 == '12' ~ "More than $85,000"
),
postpartum_check = case_when(
pph1 == '1' ~ "yes",
pph1 == '2' ~ "no"),
zipcode = fixd2) %>%
select("ph1":"el1", "el9", "el11", "el13a":"el17f", "ih1", "mh4", "es1a": "es3", "SAMP_WEIGHT", "POP_WEIGHT", "leave_type":"pct_unpaid", "partner":"zipcode", "postpartum_check")
Save cleaned data set
write.csv(wfls_df, "./data/cleaned_wfls.csv")
Merge data sets
cleaned_wfls =
read_csv("./data/cleaned_wfls.csv")
zipcodes =
read_xlsx("./data/zip_codes.xlsx") %>%
mutate(zipcode = as.character(zipcode))
merged_wfls =
left_join(cleaned_wfls, zipcodes, by = "zipcode")
write.csv(merged_wfls, "./data/merged_wfls.csv")
race =
merged_wfls %>%
drop_na(race) %>%
drop_na(leave_weeks) %>%
mutate(race = fct_reorder(race, leave_weeks)) %>%
ggplot(aes(x = race, y = leave_weeks, fill = race, alpha = 0.9)) +
geom_boxplot() +
theme(axis.text.x = element_text(angle = 60, vjust = 0.5, hjust = 1), legend.position = "none") +
labs(
title = "Weeks of maternity leave by race",
x = "Race",
y = "Weeks of leave"
)
ggplotly(race)
1a) Unpaid Leave by Race
unpaid =
merged_wfls %>%
drop_na(race) %>%
drop_na(unpaid_leave_weeks) %>%
mutate(race = fct_reorder(race, unpaid_leave_weeks)) %>%
ggplot(aes(x = race, y = unpaid_leave_weeks, fill = race, alpha = 0.9)) +
geom_boxplot() +
theme(axis.text.x = element_text(angle = 60, vjust = 0.5, hjust = 1), legend.position = "none") +
labs(
title = "Unpaid maternity leave by race",
x = "Race",
y = "Unpaid Weeks of leave"
)
ggplotly(unpaid)
parent =
merged_wfls %>%
drop_na(partner) %>%
drop_na(leave_weeks) %>%
ggplot(aes(x = partner, y = leave_weeks, fill = partner)) +
geom_boxplot() +
labs(
title = "Weeks of maternity leave by co-parenting status",
x = "Co-parenting status",
y = "Weeks of leave"
)
ggplotly(parent)
3a) income, food insecurity, and unpaid leave weeks
unpaid =
merged_wfls %>%
drop_na(family_income) %>%
drop_na(unpaid_leave_weeks) %>%
mutate(food_insecurity = as.character(food_insecurity),
food_insecurity = case_when(
food_insecurity == '0' ~ "no",
food_insecurity == '1' ~ "yes"),
family_income = fct_reorder(family_income, es3)) %>%
ggplot(aes(x = family_income, y = unpaid_leave_weeks, color = food_insecurity)) +
geom_point() +
theme(axis.text.x = element_text(angle = 60, vjust = 0.5, hjust = 1)) +
labs(
title = "Unpaid maternity leave by income",
x = "Family Income",
y = "Weeks of unpaidleave"
)
ggplotly(unpaid)
3b) income, food insecurity, and leave weeks
income =
merged_wfls %>%
drop_na(family_income) %>%
drop_na(leave_weeks) %>%
mutate(food_insecurity = as.character(food_insecurity),
food_insecurity = case_when(
food_insecurity == '0' ~ "no",
food_insecurity == '1' ~ "yes"),
family_income = fct_reorder(family_income, es3)) %>%
ggplot(aes(x = family_income, y = leave_weeks, color = food_insecurity)) +
geom_point() +
theme(axis.text.x = element_text(angle = 60, vjust = 0.5, hjust = 1)) +
labs(
title = "Paid leave by income",
x = "Family Income",
y = "Weeks of leave"
)
ggplotly(income)
unemploy =
merged_wfls %>%
drop_na(unemploy_reason) %>%
ggplot(aes(x = unemploy_reason, fill = race)) + geom_bar(position = "dodge") +
theme(axis.text.x = element_text(angle = 60, vjust = 0.5, hjust = 1)) +
labs(
title = "Reasons for Unemployment",
x = "Reason",
y = "Count")
ggplotly(unemploy)
4b return to work by education
unemploy2 =
merged_wfls %>%
drop_na(unemploy_reason) %>%
ggplot(aes(x = unemploy_reason, fill = education)) + geom_bar(position = "dodge") +
theme(axis.text.x = element_text(angle = 60, vjust = 0.5, hjust = 1)) +
labs(
title = "Reasons for Unemployment",
x = "Reason",
y = "Count")
ggplotly(unemploy2)
check =
merged_wfls %>%
drop_na(postpartum_check) %>%
ggplot(aes(x = postpartum_check, fill = family_income)) + geom_bar(position = "dodge") +
theme(axis.text.x = element_text(angle = 60, vjust = 0.5, hjust = 1)) +
labs(
title = "Postpartum Check",
x = "Postpartum Check status",
y = "Count")
ggplotly(check)
neighborhood =
merged_wfls %>%
drop_na(race) %>%
drop_na(leave_weeks) %>%
mutate(race = fct_reorder(neighborhood, leave_weeks)) %>%
ggplot(aes(x = neighborhood, y = leave_weeks, fill = race)) +
geom_violin() +
theme(axis.text.x = element_text(angle = 60, vjust = 0.5, hjust = 1), legend.position = "none") +
labs(
title = "Weeks of maternity leave by neighborhood",
x = "neighborhood",
y = "Weeks of leave"
)
ggplotly(neighborhood)
Akanksha Nalatwad, Amanda Warnock, Meghan Bellerose, Karina Myers
Visualizations and analyses performed using R (v3.6.1) and RStudio (v1.2.1335).
Additional interactivity added using plotly (v4.9.0) and Shiny (v1.3.2).
2020